package com.example.framework509.codeGen.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.example.framework509.common.annotation.entityAnnotations.Primary;
import com.example.framework509.common.annotation.entityAnnotations.Secondary;
import com.example.framework509.common.annotation.entityAnnotations.VerifyMultiRepetitionField;

import java.util.Date;

@TableName("gen_entity_field_mapper")
public class EntityFieldMapper {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Primary
    @VerifyMultiRepetitionField
    private Integer entityId;

    @Secondary
    @VerifyMultiRepetitionField
    private Integer fieldId;

    @TableLogic
    private Date isDeleted;

    @Version
    private Integer version;

    @Override
    public String toString() {
        return "EntityFieldMapper{" +
                "id=" + id +
                ", entityId=" + entityId +
                ", fieldId=" + fieldId +
                ", isDeleted=" + isDeleted +
                ", version=" + version +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getEntityId() {
        return entityId;
    }

    public void setEntityId(Integer entityId) {
        this.entityId = entityId;
    }

    public Integer getFieldId() {
        return fieldId;
    }

    public void setFieldId(Integer fieldId) {
        this.fieldId = fieldId;
    }

    public Date getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Date isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
